0.5.0 - Federico
authorArturo Espinosa <unammx@src.gnome.org>
Sat, 22 Jan 2000 23:29:21 +0000 (23:29 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Sat, 22 Jan 2000 23:29:21 +0000 (23:29 +0000)
gdk-pixbuf/ChangeLog
gdk-pixbuf/io-pnm.c
gdk-pixbuf/io-xpm.c

index ab5cf9b68a9f5433abc1f6220d658d01bd803c36..932bfd5c096f6617f0500e0efe38c133aa8626a4 100644 (file)
@@ -1,5 +1,12 @@
 2000-01-22  Federico Mena Quintero  <federico@helixcode.com>
 
+       * gdk-pixbuf/io-pnm.c (pnm_read_raw_scanline): Return an error on
+       invalid pnm type.
+       (pnm_read_ascii_scanline): Initialize data and mask.
+
+       * gdk-pixbuf/io-xpm.c (pixbuf_create_from_xpm): Initialize
+       fallbackcolor to keep gcc happy.
+
        * configure.in: Bumped version number to 0.5.0.
 
        * gdk-pixbuf/pixops/timescale.c (dump_array): Removed unused variable.
index 6d61db91b71742e86178ac0ba0755ecf220772b9..c0b0b1df24de89691904d28973432cd7268daf05 100644 (file)
@@ -392,7 +392,6 @@ pnm_read_raw_scanline (PnmLoaderContext *context)
        default:
                g_warning ("io-pnm.c: Illegal raw pnm type!\n");
                return PNM_FATAL_ERR;
-               break;
        }
        
        numpix = MIN (numpix, context->width - context->output_col);
@@ -418,7 +417,7 @@ pnm_read_raw_scanline (PnmLoaderContext *context)
                break;
        default:
                g_warning ("io-pnm.c: Illegal raw pnm type!\n");
-               break;
+               return PNM_FATAL_ERR;
        }
        
        memcpy (context->dptr + offset, inbuf->next_byte, numbytes);
@@ -458,6 +457,8 @@ pnm_read_ascii_scanline (PnmLoaderContext *context)
 
        g_return_val_if_fail (context != NULL, PNM_FATAL_ERR);
 
+       data = mask = 0;
+
        inbuf = &context->inbuf;
 
        context->dptr = context->pixels + 
index b2f0715c62d9fe4c989033c3fe3b605a6188fc69..69a3a4e79e220bd426aaa621fd281fed6fbf9b12 100644 (file)
@@ -330,6 +330,8 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
        _XPMColor *colors, *color, *fallbackcolor;
        guchar *pixels, *pixtmp;
 
+       fallbackcolor = NULL;
+
        buffer = (*get_buf) (op_header, handle);
        if (!buffer) {
                g_warning ("No XPM header found");